<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Browse Movies</title>
</head>
	<a href="/MovieProject">Home</a>
	<a href="/MovieProject/Login">Login</a>
	<a href="/MovieProject/register">Register New Account</a>
	<a href="/MovieProject/search">View Movies</a>
	<a href="/MovieProject/viewqueue">View Queue</a>
	<a href="/MovieProject/MyAccount">My Account</a>
	<a href="/MovieProject/reports">Admin: Reports</a>
	<a href="/MovieProject/CheckInRentals">Admin: Check-in</a>
	<a href="/MovieProject/newMovie">Admin: Add Movie</a>
<body>
	<div id="filteroptions">
		<form name="genreform" method="get">
			<c:forEach items="${genredropdown }" var="genre">
				<input type="submit" value="${genre.key }">
			</c:forEach>
		</form>
		<form name="ratingdropdown" method="get">
			<select name="rating">
				<c:forEach items="${ratingdropdown }" var="rating">
					<option value="${rating.key }">${rating.value }</option>
				</c:forEach>
			</select>
		</form>
		<form name="decadedropdown" method="get">
			<select name="decade">
				<c:forEach items="${decadedropdown }" var="decade">
					<option value="${decade.key }">${decade.value }</option>
				</c:forEach>
			</select>
		</form>
	</div>
	<div id="filteredmovies">
       	<ul>
	        <c:forEach items="${filterresults }" var="result">
	        	<li>
		            <a href="/MovieProject/movie?searchBox=${result.title }" >
						<img src="${result.imageURL }" />
					</a>
				</li>
			</c:forEach>
        </ul>
     </div>
</body>
</html>